export const setWarningDialogFunc = (that, res, runFunction) => {
  const { retStatus, retData } = res;
  if (retStatus === '1') {
    return false;
  }
  if (!retData) {
    return false;
  }
  const h = that.$createElement;
  const title = '信息完善错误提醒';
  const prompting = '品类为危化品一级商品，不可在普通平台售卖，需清空此类属性。';
  const spuListStr = retData.join(',');
  that.$msgbox({
    title,
    message: h('div', null, [
      h('h4', { style: 'color: #dd983e' }, prompting),
      h('h4', null, 'SPU编码如下：'),
      h('p', null, spuListStr)
    ]),
    confirmButtonText: '确定',
    type: 'warning'
  }).then(() => {
    runFunction(res.retData);
  }).catch(() => {});
}
